package admin

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) AdminList(ctx context.Context, req *system.AdminListReq) (res *system.AdminListRes, err error) {
	res = new(system.AdminListRes)
	res.List, res.Total, err = service.SystemUser().List(ctx, model.SystemUserListInput{
		Page:     req.Page,
		PageSize: req.PageSize,
		Keyword:  req.Keyword,
		RoleIds:  req.RoleIds,
		Phone:    req.Phone,
		Username: req.Username,
	})
	return
}
